package com.xjtu.controller.hello;

import com.xjtu.result.Result;
import com.xjtu.service.HelloService;
import com.xjtu.vo.HelloVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo")
@Api(tags = "demo")
public class HelloController {

    @Autowired
    private HelloService helloService;

    @GetMapping("/hello")
    @ApiOperation("演示项目的接口怎么写")
    public Result hello(){
        HelloVo hello = helloService.hello();
        return Result.success(hello);
    }
}
